﻿using System;
using System.Collections.Generic;
using ExpenseSystem.Common.BaseModel;

namespace ExpenseSystem.Model
{
    [TableName("SAM_CUSTOMER")]
    public class CustomerModel:NormalModel
    {
        private string _code;
        private string _name;
        private string _tel;
        private string _address;
        private string _deliveryaddress;
        private string _note;
        private long _regionid;
        private int _status;
        private long _salesid;
        private long _salesid2;
        private long _salespointid;
        private decimal _receiveable;
        private decimal _received;
        private decimal _otherbonus;
        private decimal _salesbonus;
        private decimal _designerbonus;
        private decimal _servicebonus;
        private long _designerid;
        private int _source;
        [Export("应收款")]
        public virtual decimal Receiveable
        {
            get { return _receiveable; }
            set
            {
                if (_receiveable == value)
                    return;
                _receiveable = value;
                if (!PropertyUpdated.Contains("Receiveable"))
                    PropertyUpdated.Add("Receiveable");
            }
        }
        [Export("已收款")]

        public virtual decimal Received
        {
            get { return _received; }
            set
            {
                if (_received == value)
                    return;
                _received = value;
                if (!PropertyUpdated.Contains("Received"))
                    PropertyUpdated.Add("Received");
            }
        }
        [Export("销售提成")]

        public virtual decimal SalesBonus
        {
            get { return _salesbonus; }
            set
            {
                if (_salesbonus == value)
                    return;
                _salesbonus = value;
                if (!PropertyUpdated.Contains("SalesBonus"))
                    PropertyUpdated.Add("SalesBonus");
            }
        }
        [Export("设计提成")]

        public virtual decimal DesignerBonus
        {
            get { return _designerbonus; }
            set
            {
                if (_designerbonus == value)
                    return;
                _designerbonus = value;
                if (!PropertyUpdated.Contains("DesignerBonus"))
                    PropertyUpdated.Add("DesignerBonus");
            }
        }
        [Export("安装提成")]

        public virtual decimal ServiceBonus
        {
            get { return _servicebonus; }
            set
            {
                if (_servicebonus == value)
                    return;
                _servicebonus = value;
                if (!PropertyUpdated.Contains("ServiceBonus"))
                    PropertyUpdated.Add("ServiceBonus");
            }
        }
        [Export("其他费用")]

        public virtual decimal OtherBonus
        {
            get { return _otherbonus; }
            set
            {
                if (_otherbonus == value)
                    return;
                _otherbonus = value;
                if (!PropertyUpdated.Contains("OtherBonus"))
                    PropertyUpdated.Add("OtherBonus");
            }
        }
        [Export("客户代号")]

        public virtual string Code
        {
            get { return _code; }
            set
            {
                if (_code == value)
                    return;
                _code = value;
                if (!PropertyUpdated.Contains("Code"))
                    PropertyUpdated.Add("Code");
            }
        }
        [Export("客户名称")]

        public virtual string Name
        {
            get { return _name; }
            set
            {
                if (_name == value)
                    return;
                _name = value;
                if (!PropertyUpdated.Contains("Name"))
                    PropertyUpdated.Add("Name");
            }
        }
        [Export("电话")]

        public virtual string Tel
        {
            get { return _tel; }
            set
            {
                if (_tel == value)
                    return;
                _tel = value;
                if (!PropertyUpdated.Contains("Tel"))
                    PropertyUpdated.Add("Tel");
            }
        }
        [Export("地址")]

        public virtual string Address
        {
            get { return _address; }
            set
            {
                if (_address == value)
                    return;
                _address = value;
                if (!PropertyUpdated.Contains("Address"))
                    PropertyUpdated.Add("Address");
            }
        }
        [Export("交货地址")]

        public virtual string DeliveryAddress
        {
            get { return _deliveryaddress; }
            set
            {
                if (_deliveryaddress == value)
                    return;
                _deliveryaddress = value;
                if (!PropertyUpdated.Contains("DeliveryAddress"))
                    PropertyUpdated.Add("DeliveryAddress");
            }
        }
        [Export("备注")]

        public virtual string Note
        {
            get { return _note; }
            set
            {
                if (_note == value)
                    return;
                _note = value;
                if (!PropertyUpdated.Contains("Note"))
                    PropertyUpdated.Add("Note");
            }
        }

        public virtual int Status
        {
            get { return _status; }
            set
            {
                if (_status == value)
                    return;
                _status = value;
                if (!PropertyUpdated.Contains("Status"))
                    PropertyUpdated.Add("Status");
            }
        }

        public virtual long RegionId
        {
            get { return _regionid; }
            set
            {
                if (_regionid == value)
                    return;
                _regionid = value;
                if (!PropertyUpdated.Contains("RegionId"))
                    PropertyUpdated.Add("RegionId");
            }
        }
        public virtual long SalesId
        {
            get { return _salesid; }
            set
            {
                if (_salesid == value)
                    return;
                _salesid = value;
                if (!PropertyUpdated.Contains("SalesId"))
                    PropertyUpdated.Add("SalesId");
            }
        }
        public virtual long SecSalesId
        {
            get { return _salesid2; }
            set
            {
                if (_salesid2 == value)
                    return;
                _salesid2 = value;
                if (!PropertyUpdated.Contains("SecSalesId"))
                    PropertyUpdated.Add("SecSalesId");
            }
        }
        public virtual long SalesPointId
        {
            get { return _salespointid; }
            set
            {
                if (_salespointid == value)
                    return;
                _salespointid = value;
                if (!PropertyUpdated.Contains("SalesPointId"))
                    PropertyUpdated.Add("SalesPointId");
            }
        }
        public virtual long DesignerId
        {
            get { return _designerid; }
            set
            {
                if (_designerid == value)
                    return;
                _designerid = value;
                if (!PropertyUpdated.Contains("DesignerId"))
                    PropertyUpdated.Add("DesignerId");
            }
        }
        public virtual int Source
        {
            get { return _source; }
            set
            {
                if (_source == value)
                    return;
                _source = value;
                if (!PropertyUpdated.Contains("Source"))
                    PropertyUpdated.Add("Source");
            }
        }
    }
}
